<!DOCTYPE html>
<html lang="en">
<body>
	<h1>h1</h1>
	<h2>h2</h2>
	<h3>h3</h3>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script>
		(function($) {
			// We pass in h3 first, but h1 appears earlier in     
			// the document, so it is first in the wrapper set.     
			alert($('h3, h2, h1').get(0).nodeName);
			// Alerts "H1" 
		})(jQuery);
	</script>
</body>
</html>